package com.lucy.flow.service;

import com.lucy.common.service.BaseService;
import com.lucy.common.service.UnwrapService;
import com.lucy.flow.domain.entity.FlowWork;

/**
 * @author kindear
 * 流程实例接口定义
 */
public interface FlowWorkService extends BaseService<FlowWork,String>, UnwrapService<FlowWork,String> {
    /**
     * 流转至下一节点
     * @param flowWorkId 流程实例ID
     * @return 流转后流程实例信息
     */
    FlowWork toNext(String flowWorkId);

    /**
     * 流转至下一节点
     * @param flowWork 流程实例信息
     * @return 流转后流程实例信息
     */
    FlowWork toNext(FlowWork flowWork);

    /**
     * 根据业务ID查询
     * @param bizId 业务ID
     * @return 流程实例
     */
    FlowWork getByBizId(String bizId);
}
